//by k1 2022.2.19

params ["_player", "_targetPos", "_type", "_name"];

if (count _targetPos == 0) then [{
	[_player, "kk_Escape_airStrike_5"] remoteExec ["Escape_fn_addCommMenuItem", _player];
},{
	_Players = call A3E_fnc_GetPlayers - Escape_Players_enemy;
	[ [format ["火炮支援: 即将对坐标点%1进行火力覆盖！", mapGridPosition _targetPos], "PLAIN"] ] remoteExec ["TitleText", _Players];
	[time/60,_targetPos,"炮击",_name] remoteExec ["Escape_cas_mak", _Players];
	
	_z = 50;
	_shellClass = "Bo_Mk82_MI08";
	sleep 8;
	_shell = _shellClass createVehicle [((_targetPos select 0) + random 20),((_targetPos select 1) - random 20), _z];
	_shell setVelocity [0,0,-9999];
	sleep .05;
	_shell = _shellClass createVehicle [((_targetPos select 0) - random 20),((_targetPos select 1) + random 20), _z];
	_shell setVelocity [0,0,-9999];
	sleep .05;
	_shell = _shellClass createVehicle [((_targetPos select 0) + random 20),((_targetPos select 1) - random 20), _z];
	_shell setVelocity [0,0,-9999];
}];

